package com;

import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

public class Last extends JPanel implements MouseListener {
    private Image Bk4=new ImageIcon("bk4.jpg").getImage();
    int x;

    Last(){

        JFrame jf = new JFrame();
        jf.setTitle("最后");
        jf.setVisible(true);
        jf.add(this);
        jf.setFocusable(true);
        jf.addMouseListener(this);
        jf.setBounds(200,50,1100,750);
        jf.setResizable(false);
      jf.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    }

    @Override
    public void paint(Graphics g) {
        g.drawImage(Bk4,0,0,1100,750,null);
        g.setFont(new Font("楷体",Font.BOLD,20));
        g.drawString("神秘的老头：实验终于成功了呢！",300,550);
        g.drawString("我：实验？？我在哪？？",300,580);
        g.setColor(Color.red);
        g.drawString("未完待续。。。",360,610);
        g.drawString("请点击关闭游戏",340,630);

    }

    public static void main(String[] args) {
        new Last();
    }


    @Override
    public void mouseClicked(MouseEvent e) {

    }

    @Override
    public void mousePressed(MouseEvent e) {
           System.exit(0);
    }

    @Override
    public void mouseReleased(MouseEvent e) {

    }

    @Override
    public void mouseEntered(MouseEvent e) {

    }

    @Override
    public void mouseExited(MouseEvent e) {

    }
}
